from selenium import webdriver
from selenium.webdriver.common.by import By
import os.path
import time

path = os.path.join(os.path.abspath(os.path.dirname('第2题')), 'html','注册B.html')
driver = webdriver.Chrome()
driver.get(path)

userB = driver.find_element(By.ID,'userB')
userB.send_keys('a1234')

passwordB = driver.find_element(By.ID,'passwordB')
passwordB.send_keys('aa12345')

telB = driver.find_element(By.ID,'telB')
telB.send_keys('18871185435')

emailB = driver.find_element(By.ID,'emailB')
emailB.send_keys('14825678@qq.com')

register_user =driver.find_element(By.XPATH,'//*[@id="zc"]/fieldset/button')
register_user.click()